-- GENERATED SPELL FOR [High Priest Thel'danis] --


function spell0_1854(pUnit, Event) --@Dispel Magic,n/a--
pUnit:FullCastSpellOnTarget(15090,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_1854', 598, 1)
end

function spell1_1854(pUnit, Event) --@Greater Dispel,n/a--
pUnit:FullCastSpellOnTarget(24997,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_1854', 4000, 1)
end

function spell2_1854(pUnit, Event) --@Heal,Heal--
pUnit:FullCastSpellOnTarget(30155,pUnit)
pUnit:RegisterEvent('Sorts_1854', 3000, 1)
end

function spell3_1854(pUnit, Event) --@Holy Smite,n/a--
pUnit:FullCastSpellOnTarget(15498,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_1854', 2500, 1)
end

function spell4_1854(pUnit, Event) --@Inner Fire,Self--
pUnit:FullCastSpellOnTarget(10951,pUnit)
pUnit:RegisterEvent('Sorts_1854', 681, 1)
end

function Sorts_1854(pUnit, Event)
local choix_sorts_1854 = math.random(0, 4)
if choix_sorts_1854 == 0 then
pUnit:RegisterEvent('spell0_1854', 1, 1)
end
if choix_sorts_1854 == 1 then
pUnit:RegisterEvent('spell1_1854', 1, 1)
end
if choix_sorts_1854 == 2 then
pUnit:RegisterEvent('spell2_1854', 1, 1)
end
if choix_sorts_1854 == 3 then
pUnit:RegisterEvent('spell3_1854', 1, 1)
end
if choix_sorts_1854 == 4 then
pUnit:RegisterEvent('spell4_1854', 1, 1)
end
end

function mob1854_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_1854', math.random(1500, 3000), 1)
end

function mob1854_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob1854_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob1854_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(1854, 1, 'mob1854_Action')
RegisterUnitEvent(1854, 2, 'mob1854_Leave')
RegisterUnitEvent(1854, 3, 'mob1854_Kill')
RegisterUnitEvent(1854, 4, 'mob1854_Die')
